<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Test-Chart</title>

    <link rel="stylesheet" href="../css/pilot-chart.css">
    <!-- <script src="https://cdn.bootcss.com/knockout/3.5.0-rc2/knockout-min.js"></script> -->
    <script src="https://cdn.bootcss.com/jquery/2.2.3/jquery.min.js"></script>
    <script src="https://cdn.highcharts.com.cn/highstock/highstock.js"></script>
    <script src="http://cdn.highcharts.com.cn/highstock/highcharts-more.js"></script>
    <script src="http://cdn.highcharts.com.cn/highstock/modules/exporting.js"></script>
    <script src="../js/vender/Rx.min.js"></script>
</head>

<body style="overflow: hidden; " onfocus="document.getElementById('highChartsContainer').focus();">

    <div class="pilotchart-wrapper">
        <div id="highChartsContainer"></div>
        <select id="select_chartType" class="timeSeries-select">
                <option value="line">line</span></option>
                <option value="ohlc">ohlc</option>
                <option value="candlestick">candlestick</option>
        </select>
    </div>

    <script>
        var ohlcData = [
    [1317888000000,372.5101,375,372.2,372.52],
    [1317888060000,372.4,373,372.01,372.16],
    [1317888120000,372.16,372.4,371.39,371.62],
    [1317888180000,371.62,372.16,371.55,371.75],
    [1317888240000,371.75,372.4,371.57,372],
    [1317888300000,372,372.3,371.8,372.24],
    [1317888360000,372.22,372.45,372.22,372.3],
    [1317888420000,372.3,373.25,372.3,373.15],
    [1317888480000,373.01,373.5,373,373.24],
    [1317888540000,373.36,373.88,373.19,373.88],
    [1317888600000,373.8,374.34,373.75,374.29],
    [1317888660000,374.29,374.43,374,374.01],
    [1317888720000,374.05,374.35,373.76,374.35],
    [1317888780000,374.41,375.24,374.37,374.9],
    [1317888840000,374.83,375.73,374.81,374.96],
    [1317888900000,374.81,375.4,374.81,375.25],
    [1317888960000,375.2,375.7,375.14,375.19],
    [1317889020000,375.43,375.43,374.75,374.76],
    [1317889080000,374.94,375.5,374.81,375.13],
    [1317889140000,375.12,375.48,375,375.04],
    [1317889200000,375.24,375.24,375,375.08],
    [1317889260000,375.16,375.16,374.51,374.51],
    [1317889320000,374.51,374.75,374.2,374.27],
    [1317889380000,374.22,374.55,373.83,374.55],
    [1317889440000,374.69,374.86,374.01,374.2],
    [1317889500000,374.32,374.65,374.31,374.51],
    [1317889560000,374.65,375.12,374.51,375.12],
    [1317889620000,375.13,375.25,374.83,375.22],
    [1317889680000,375.16,375.22,375,375],
    [1317889740000,375,375,374.66,374.8],
    [1317889800000,374.88,375,374.5,374.85],
    [1317889860000,374.41,374.67,374.25,374.67],
    [1317889920000,374.5,374.75,374.27,374.42],
    [1317889980000,374.4,374.93,374.38,374.85],
    [1317890040000,374.86,375.3,374.8,375.09],
    [1317890100000,375,375.18,374.9,375.02],
    [1317890160000,375.02,375.08,374.86,374.87],
    [1317890220000,374.93,375.75,374.93,375.75],
    [1317890280000,375.75,376.5,375.75,376.31],
    [1317890340000,376.31,377.2,376.19,377.04],
    [1317890400000,377.2,377.33,376.45,376.47],
    [1317890460000,376.75,376.99,376.53,376.54],
    [1317890520000,376.54,376.67,376.08,376.35],
    [1317890580000,376.41,376.94,376.2,376.5],
    [1317890640000,376.46,376.51,376.06,376.09],
    [1317890700000,376.38,376.84,376.09,376.78],
    [1317890760000,376.55,376.6,376.41,376.44],
    [1317890820000,376.45,376.87,376.31,376.87],
    [1317890880000,376.83,377,376.63,376.95],
    [1317890940000,376.95,377,376.1,376.1],
    [1317891000000,376.1,376.17,375.64,375.65],
    [1317891060000,375.68,376.05,375.32,376.05],
    [1317891120000,376.03,376.04,375.5,375.72],
    [1317891180000,375.83,376.195,375.7,376],
    [1317891240000,376.01,376.6,376,376.5],
    [1317891300000,376.5,376.53,376.11,376.21],
    [1317891360000,376.17,376.3,376.1,376.25],
    [1317891420000,376.4,376.4,376.13,376.29],
    [1317891480000,376.15,376.39,376.1,376.39],
    [1317891540000,376.4,377.11,376.4,377],
    [1317891600000,377.01,377.15,376.79,377.15],
    [1317891660000,377.02,377.15,376.55,376.88],
    [1317891720000,376.67,376.76,376.52,376.53],
    [1317891780000,376.78,376.91,376.53,376.82],
    [1317891840000,376.73,376.86,376.7,376.75],
    [1317891900000,376.7,376.71,376.5,376.57],
    [1317891960000,376.53,376.74,376.2,376.2],
    [1317892020000,376.17,376.17,375.91,376],
    [1317892080000,376,376,375.77,375.77],
    [1317892140000,375.78,375.88,375.51,375.57],
    [1317892200000,375.57,375.79,375.34,375.63],
    [1317892260000,375.63,375.78,375.35,375.41],
    [1317892320000,375.38,375.61,375.35,375.58],
    [1317892380000,375.55,375.57,375.34,375.48],
    [1317892440000,375.43,375.57,375.12,375.13],
    [1317892500000,375.15,375.3,374.86,375],
    [1317892560000,374.9,375.31,374.72,375.14],
    [1317892620000,375,375.2,374.9,375.06],
    [1317892680000,375.18,375.6,375.12,375.6],
    [1317892740000,375.6,375.87,375.5,375.5],
    [1317892800000,375.49,375.49,375.04,375.25],
    [1317892860000,375.25,375.46,375,375.24],
    [1317892920000,375.38,375.45,375,375.1],
    [1317892980000,375.09,375.24,374.83,374.97],
    [1317893040000,375.01,375.01,374.8,374.87],
    [1317893100000,374.98,375.12,374.98,375],
    [1317893160000,374.9,374.95,374.75,374.87],
    [1317893220000,374.89,375.44,374.87,375.12],
    [1317893280000,375.06,375.12,373.56,374.05],
    [1317893340000,374.1,374.3,373.16,373.21],
    [1317893400000,373.39,375,372.58,374.8],
    [1317893460000,374.899,375.23,374.33,374.75],
    [1317893520000,374.79,376.71,374.69,376.31],
    [1317893580000,376.32,376.37,375.27,375.331],
    [1317893640000,375.3301,377.44,375.33,377.43],
    [1317893700000,377.43,378.14,376.83,377.08],
    [1317893760000,377.18,378,376.5,376.7],
    [1317893820000,376.83,377,375.51,375.79],
    [1317893880000,375.6501,376.74,375.23,376.39],
    [1317893940000,376.38,378.75,376.25,378.5],
    [1317894000000,378.54,378.63,376.75,376.87],
    [1317894060000,376.8664,377.62,376.64,376.908],
    [1317894120000,376.8336,377.88,376.8289,377.55],
    [1317894180000,377.36,377.9,376.52,376.75],
    [1317894240000,376.83,377.73,376.71,376.98],
    [1317894300000,377,377.69,376.87,377.1212],
    [1317894360000,377.225,377.33,376.01,376.26],
    [1317894420000,376.42,376.64,375.55,375.5534],
    [1317894480000,375.74,375.94,374.77,375.3],
    [1317894540000,375.3313,376,374.92,375.06],
    [1317894600000,375.11,375.46,374.82,374.92],
    [1317894660000,374.82,375.68,374.64,375.668],
    [1317894720000,375.62,376.13,375.46,376.13],
    [1317894780000,376.14,376.6,375.89,376.34],
    [1317894840000,376.39,376.39,375.55,375.99],
    [1317894900000,376,376.28,375.42,376.21],
    [1317894960000,376,377.38,375.7,376.591],
    [1317895020000,376.59,377.46,376.57,376.9348],
    [1317895080000,376.9481,377.749,376.84,377.563],
    [1317895140000,377.452,377.65,376.43,376.78],
    [1317895200000,376.94,377.01,375.75,375.98],
    [1317895260000,376.27,377.29,375.95,376.98],
    [1317895320000,376.9962,377.3,376.69,376.71],
    [1317895380000,376.75,377.5,376.75,377.41],
    [1317895440000,377.26,377.49,376.89,377.368],
    [1317895500000,377.345,378,377.17,378],
    [1317895560000,377.97,378.3199,377.68,377.97],
    [1317895620000,378.01,378.07,377.25,377.37],
    [1317895680000,377.37,377.75,377.05,377.12],
    [1317895740000,377.16,377.79,377.01,377.4512],
    [1317895800000,377.64,378.02,377.46,377.84],
    [1317895860000,377.82,378.5,377.63,378.45],
    [1317895920000,378.44,378.62,378.26,378.428],
    [1317895980000,378.53,379.21,378.39,378.9755],
    [1317896040000,379,379.83,378.962,379.54],
    [1317896100000,379.55,379.88,379.31,379.35],
    [1317896160000,379.4288,379.43,378.841,379.07],
    [1317896220000,379.16,379.28,378.29,378.88],
    [1317896280000,378.92,379.42,378.651,379.42],
    [1317896340000,379.2601,380,379.17,380],
    [1317896400000,380,380.87,379.9,380.77],
    [1317896460000,380.788,381.75,380.53,381.5],
    [1317896520000,381.48,381.719,381.02,381.45],
    [1317896580000,381.4026,381.65,380.5,381],
    [1317896640000,380.87,382.75,380.87,382.44],
    [1317896700000,382.6599,383,381.75,381.92],
    [1317896760000,381.99,382.31,381.82,381.9401],
    [1317896820000,381.95,382.16,381.6,381.88],
    [1317896880000,381.9188,382.05,380.77,381.2],
    [1317896940000,381.15,382.48,381.13,382.29],
    [1317897000000,382.29,382.8,382,382.8],
    [1317897060000,382.69,383.25,382.67,382.95],
    [1317897120000,382.838,383.84,382.829,383.48],
    [1317897180000,383.5305,383.7,383.23,383.4],
    [1317897240000,383.39,383.81,382.84,383.78],
    [1317897300000,383.75,384.76,383.728,384.6],
    [1317897360000,384.61,384.78,383.92,384.2197],
    [1317897420000,384.14,384.21,383.722,383.89],
    [1317897480000,383.915,384.67,383.77,384.141],
    [1317897540000,384.14,384.4,383.87,383.9],
    [1317897600000,383.92,384,383.14,383.24],
    [1317897660000,383.262,383.6757,383.07,383.22],
    [1317897720000,383.366,383.7,383.2,383.598],
    [1317897780000,383.6325,383.95,383.503,383.8],
    [1317897840000,383.67,384.2388,383.44,384.2388],
    [1317897900000,384.2144,384.25,383.2,383.64],
    [1317897960000,383.64,384.18,383.4,383.53],
    [1317898020000,383.53,383.65,382.71,382.93],
    [1317898080000,383.02,383.71,382.99,383.392],
    [1317898140000,383.33,383.33,382.5,382.67],
    [1317898200000,382.68,382.68,382,382.148],
    [1317898260000,382.24,382.52,381.95,382.5],
    [1317898320000,382.42,382.59,382.13,382.32],
    [1317898380000,382.26,382.325,381.65,382.1],
    [1317898440000,381.9228,382.58,381.9228,382.47],
    [1317898500000,382.41,382.9999,382.35,382.9696],
    [1317898560000,382.8811,383.07,382.1,382.13],
    [1317898620000,382.13,382.15,381.7,382.12],
    [1317898680000,381.92,382.04,381.36,381.7],
    [1317898740000,381.61,381.9,381.4,381.4],
    [1317898800000,381.43,381.92,381.38,381.418],
    [1317898860000,381.37,381.49,380.62,381],
    [1317898920000,381.01,381.145,380.39,381.145],
    [1317898980000,381.1,381.85,381.1,381.66],
    [1317899040000,381.637,382.3,381.637,381.87],
    [1317899100000,381.859,382.37,381.7501,382.058],
    [1317899160000,382.1416,382.21,381.76,382.2],
    [1317899220000,382.08,383.43,382.01,383.12],
    [1317899280000,383.13,383.25,382.57,382.91],
    [1317899340000,382.91,383.8,382.91,383.786],
    [1317899400000,383.775,383.82,383.31,383.77],
    [1317899460000,383.78,383.84,383.31,383.6688],
    [1317899520000,383.6267,383.65,382.7912,383.1],
    [1317899580000,383.15,383.68,383,383.67],
    [1317899640000,383.67,383.68,383.39,383.62],
    [1317899700000,383.62,383.62,382.66,382.94],
    [1317899760000,382.97,383.19,382.92,382.93],
    [1317899820000,382.9212,383.22,382.86,382.932],
    [1317899880000,383.01,383.16,382.92,382.97],
    [1317899940000,382.97,383.02,382.23,382.34],
    [1317900000000,382.26,382.55,382.2,382.4],
    [1317900060000,382.34,382.4988,381.85,382.17],
    [1317900120000,382.16,382.3,381.81,382],
    [1317900180000,382,382.3788,381.69,381.96],
    [1317900240000,381.99,382.31,381.74,382.07],
    [1317900300000,382.01,382.38,381.97,382.26],
    [1317900360000,382.25,382.75,382.25,382.741],
    [1317900420000,382.734,382.75,381.92,382.23],
    [1317900480000,382.23,382.46,382.14,382.32],
    [1317900540000,382.255,382.5,382.19,382.27],
    [1317900600000,382.27,382.79,382.255,382.79],
    [1317900660000,382.79,383.44,382.664,383.12],
    [1317900720000,383.12,383.209,382.58,382.72],
    [1317900780000,382.69,383.02,382.5,382.9],
    [1317900840000,382.856,383.19,382.856,383.09],
    [1317900900000,383.02,383.21,382.82,382.952],
    [1317900960000,383.04,383.2,382.75,383.15],
    [1317901020000,383.22,383.22,382.91,383.02],
    [1317901080000,383.17,383.25,382.9,383.07],
    [1317901140000,383.16,383.35,383.04,383.33],
    [1317901200000,383.25,383.3,383.07,383.07],
    [1317901260000,383,383.15,382.66,382.99],
    [1317901320000,382.9824,383.13,382.85,382.96],
    [1317901380000,382.8912,383.15,382.62,382.62],
    [1317901440000,382.6,382.84,382.45,382.82],
    [1317901500000,382.73,382.9,382.6,382.86],
    [1317901560000,382.86,382.9,382.54,382.631],
    [1317901620000,382.634,382.634,382.01,382.13],
    [1317901680000,382.28,382.284,381.79,382.02],
    [1317901740000,381.9672,382.101,381.9,382.07],
    [1317901800000,382.08,382.28,381.95,382.2],
    [1317901860000,382.09,382.5,382.03,382.27],
    [1317901920000,382.27,382.313,382.07,382.08],
    [1317901980000,382.06,382.1,381.728,381.73],
    [1317902040000,381.7312,381.92,381.27,381.49],
    [1317902100000,381.43,381.99,381.37,381.94],
    [1317902160000,381.9,381.934,381.44,381.56],
    [1317902220000,381.61,381.67,381.36,381.5],
    [1317902280000,381.4999,381.8,381.491,381.7388],
    [1317902340000,381.79,382,381.46,381.69],
    [1317902400000,381.702,381.99,381.69,381.99],
    [1317902460000,381.966,381.9836,381.45,381.642],
    [1317902520000,381.62,381.73,381.5,381.63],
    [1317902580000,381.62,381.91,381.49,381.75],
    [1317902640000,381.88,382.14,381.84,381.9897],
    [1317902700000,381.97,382.076,381.9,382],
    [1317902760000,382.02,382.06,381.72,382.05],
    [1317902820000,381.95,382.24,381.87,381.87],
    [1317902880000,381.88,382.1,381.79,382.056],
    [1317902940000,382,382,381.7112,381.73],
    [1317903000000,381.7,381.89,381.63,381.77],
    [1317903060000,381.68,382,381.64,381.8975],
    [1317903120000,381.9,382.03,381.79,381.895],
    [1317903180000,381.76,382.099,381.64,382.099],
    [1317903240000,382.085,382.2,381.83,382.07],
    [1317903300000,382.105,382.33,381.92,381.92],
    [1317903360000,381.9,382.19,381.7,382.1757],
    [1317903420000,382.1,382.48,381.99,382.48],
    [1317903480000,382.49,382.67,382.31,382.55],
    [1317903540000,382.51,382.6,382.4,382.46],
    [1317903600000,382.46,382.79,382.34,382.54],
    [1317903660000,382.62,382.93,382.5784,382.77],
    [1317903720000,382.65,382.89,382.51,382.8],
    [1317903780000,382.79,382.8,382.29,382.47],
    [1317903840000,382.53,382.76,382.52,382.76],
    [1317903900000,382.75,382.84,382.58,382.75],
    [1317903960000,382.7799,382.7895,382.59,382.76],
    [1317904020000,382.75,382.8896,382.61,382.85],
    [1317904080000,382.87,382.88,382.31,382.43],
    [1317904140000,382.45,382.5,382.35,382.44],
    [1317904200000,382.36,382.42,382.1,382.13],
    [1317904260000,382.13,382.459,382.03,382.3],
    [1317904320000,382.436,382.6,382.3001,382.58],
    [1317904380000,382.58,382.74,382.58,382.58],
    [1317904440000,382.58,382.74,382.34,382.618],
    [1317904500000,382.608,382.72,382.3,382.345],
    [1317904560000,382.3813,382.48,382.27,382.39],
    [1317904620000,382.436,382.5,382.27,382.42],
    [1317904680000,382.42,382.42,381.9,382.02],
    [1317904740000,382.1288,382.199,381.83,381.83],
    [1317904800000,381.95,382.19,381.79,381.92],
    [1317904860000,381.91,382.08,381.86,382],
    [1317904920000,381.97,382.02,381.27,381.3],
    [1317904980000,381.31,381.38,379.861,379.861],
    [1317905040000,379.88,380.46,379.73,380.37],
    [1317905100000,380.3,380.38,379.8,379.82],
    [1317905160000,379.855,379.89,378.93,379.03],
    [1317905220000,378.92,379.25,378.05,378.25],
    [1317905280000,378.25,378.9,378.06,378.62],
    [1317905340000,378.6387,379.13,378.22,379.03],
    [1317905400000,378.93,379.03,378.5,378.949],
    [1317905460000,378.9374,379.05,378.29,378.29],
    [1317905520000,378.43,378.46,377.56,377.59],
    [1317905580000,377.6,377.804,376.66,376.885],
    [1317905640000,376.9789,377.36,376.84,377.16],
    [1317905700000,377.01,377.5,376.93,377.31],
    [1317905760000,377.31,378.15,377.26,377.968],
    [1317905820000,377.89,377.9299,377.25,377.67],
    [1317905880000,377.68,378.44,377.68,378],
    [1317905940000,378,378.116,377,377.01],
    [1317906000000,377,377.66,376.8,377.59],
    [1317906060000,377.56,377.7,376.98,377.21],
    [1317906120000,377.17,377.37,376.74,376.97],
    [1317906180000,377,377.13,376.75,376.95],
    [1317906240000,376.96,377.84,376.86,377.31],
    [1317906300000,377.35,377.53,376.25,376.33],
    [1317906360000,376.31,377.43,376.25,376.39],
    [1317906420000,376.4224,376.59,376.06,376.48],
    [1317906480000,376.47,377.609,376.39,377],
    [1317906540000,376.97,377.94,376.838,377.8399],
    [1317906600000,377.705,377.86,377.24,377.49],
    [1317906660000,377.48,378.18,377.48,378.1475],
    [1317906720000,378.032,378.35,377.77,378.35],
    [1317906780000,378.3,378.35,377.61,377.85],
    [1317906840000,377.8,378.47,377.8,378.13],
    [1317906900000,378.1,378.2303,377.07,377.179],
    [1317906960000,377.18,377.58,376.97,377.25],
    [1317907020000,377.14,377.24,376.5,376.79],
    [1317907080000,376.79,376.8499,376.25,376.51],
    [1317907140000,376.68,376.9949,376.51,376.64],
    [1317907200000,376.638,376.85,376.25,376.26],
    [1317907260000,376.32,376.51,376.12,376.394],
    [1317907320000,376.49,376.76,376.251,376.6],
    [1317907380000,376.69,376.86,376.42,376.58],
    [1317907440000,376.58,376.6688,376.2,376.49],
    [1317907500000,376.49,376.89,376.44,376.5],
    [1317907560000,376.47,376.58,376.36,376.446],
    [1317907620000,376.45,376.58,376.3,376.3],
    [1317907680000,376.31,376.31,375,375.18],
    [1317907740000,375.1,375.14,374.14,374.228],
    [1317907800000,374.3,374.4,373.46,374.3],
    [1317907860000,374.29,374.998,374.16,374.94],
    [1317907920000,374.949,375.339,374.751,374.94],
    [1317907980000,374.982,375.63,374.8,375.5],
    [1317908040000,375.58,375.79,375.45,375.56],
    [1317908100000,375.56,375.71,374.78,374.8],
    [1317908160000,374.87,374.989,374.2,374.344],
    [1317908220000,374.365,374.57,374.13,374.48],
    [1317908280000,374.46,374.509,373.38,373.38],
    [1317908340000,373.37,373.42,371.97,371.97],
    [1317908400000,371.99,372.69,371.8045,372.66],
    [1317908460000,372.65,373.52,372.56,373.1],
    [1317908520000,373.1,373.45,372.87,373.36],
    [1317908580000,373.34,373.34,372.39,372.53],
    [1317908640000,372.53,372.66,372.06,372.24],
    [1317908700000,372.2662,373.6,372,373.4],
    [1317908760000,373.42,373.78,373.04,373.34],
    [1317908820000,373.336,373.73,373,373.61],
    [1317908880000,373.68,374.09,373.01,373.08],
    [1317908940000,373.09,373.66,372.77,373.344],
    [1317909000000,373.385,373.77,373.2,373.45],
    [1317909060000,373.46,374.32,373.27,374.296],
    [1317909120000,374.2258,374.98,374.17,374.97],
    [1317909180000,374.94,375.48,373.3,375.14],
    [1317909240000,375.03,375.322,374.66,375.046],
    [1317909300000,375.19,375.539,375.03,375.23],
    [1317909360000,375.3249,375.3269,374.65,374.83],
    [1317909420000,374.83,374.95,374.39,374.89],
    [1317909480000,374.73,375.17,374.6,375.17],
    [1317909540000,375.138,375.42,374.924,375.3852],
    [1317909600000,375.3198,375.78,375.16,375.37],
    [1317909660000,375.37,375.5,374.3,374.34],
    [1317909720000,374.44,374.7,374.19,374.57],
    [1317909780000,374.57,375.44,374.54,375.23],
    [1317909840000,375.278,375.56,375,375.1334],
    [1317909900000,375.154,375.46,375.15,375.35],
    [1317909960000,375.37,375.72,375.332,375.69],
    [1317910020000,375.72,376.98,375.501,376.58],
    [1317910080000,376.521,377.159,376.3,376.85],
    [1317910140000,376.9098,377.46,376.82,377.368],
    [1317910200000,377.3688,377.37,376.79,377.18],
    [1317910260000,377.16,377.6894,377.061,377.39],
    [1317910320000,377.34,377.485,376.7,376.85],
    [1317910380000,376.8499,376.95,376.39,376.76],
    [1317910440000,376.71,376.8,376.17,376.35],
    [1317910500000,376.26,377.2,376.18,376.68],
    [1317910560000,376.68,376.95,376.68,376.85],
    [1317910620000,376.85,376.85,376.53,376.76],
    [1317910680000,376.62,377.19,376.49,376.99],
    [1317910740000,376.98,377.99,376.76,377.99],
    [1317910800000,377.989,378.05,377.38,377.87],
    [1317910860000,377.71,377.87,377.34,377.6],
    [1317910920000,377.6,377.668,376.96,377.23],
    [1317910980000,377.23,377.91,377.1204,377.72],
    [1317911040000,377.72,377.76,376.63,376.686],
    [1317911100000,376.67,377,376.46,376.68],
    [1317911160000,376.68,376.728,375.6,376.02],
    [1317911220000,376.01,376.25,375.75,376.17],
    [1317911280000,376.05,376.2,375.69,375.97],
    [1317911340000,375.92,376.32,375.78,376.2448],
    [1317911400000,376.269,376.96,376.15,376.8],
    [1317911460000,376.92,376.92,376.32,376.514],
    [1317911520000,376.5499,376.96,376.382,376.6044],
    [1317911580000,376.71,376.72,375.77,375.772],
    [1317911640000,375.81,375.87,375,375.1349],
    [1317911700000,375.08,375.15,374.59,375],
    [1317911760000,374.8811,375,374.31,374.98],
    [1317911820000,374.97,375.28,374.6,374.894],
    [1317911880000,374.81,375.779,374.81,375.73],
    [1317911940000,375.73,375.75,374.93,374.93],
    [1317912000000,374.95,374.99,374.28,374.7],
    [1317912060000,374.709,375.28,374.42,375.199],
    [1317912120000,375.174,375.187,374.45,374.45],
    [1317912180000,374.41,374.94,374.41,374.55],
    [1317912240000,374.65,375.18,374.6,374.8],
    [1317912300000,374.8,375.2,374.6,374.922],
    [1317912360000,374.97,375.41,374.66,374.76],
    [1317912420000,374.6,375.0752,374.51,374.6],
    [1317912480000,374.64,375.48,374.51,375.345],
    [1317912540000,375.304,375.36,374.5,374.5004],
    [1317912600000,374.62,375.15,374.52,374.82],
    [1317912660000,374.65,374.8,374,374.14],
    [1317912720000,374.23,374.51,374.04,374.46],
    [1317912780000,374.58,375.08,374.53,374.6712],
    [1317912840000,374.8076,375.4,374.73,375.35],
    [1317912900000,375.32,375.4,375.03,375.175],
    [1317912960000,375.2,375.25,374.76,375.25],
    [1317913020000,375.16,376.37,375.16,375.76],
    [1317913080000,375.78,376.128,375.73,375.97],
    [1317913140000,375.94,376.77,375.92,376.531],
    [1317913200000,376.68,376.69,375.79,375.79],
    [1317913260000,375.9,376.34,375.73,376.24],
    [1317913320000,376.21,376.24,375.76,375.775],
    [1317913380000,375.75,375.84,375.261,375.46],
    [1317913440000,375.41,375.89,375.3,375.683],
    [1317913500000,375.7,376.25,375.61,376.13],
    [1317913560000,376.18,376.18,375.7,376.045],
    [1317913620000,376,376.56,375.55,376.5],
    [1317913680000,376.49,377.85,376.46,377.709],
    [1317913740000,377.71,377.82,377.16,377.42],
    [1317913800000,377.43,377.95,377.43,377.65],
    [1317913860000,377.76,377.98,377.43,377.468],
    [1317913920000,377.47,377.74,377.24,377.3],
    [1317913980000,377.201,377.27,376.56,376.56],
    [1317914040000,376.52,376.76,375.59,375.788],
    [1317914100000,375.82,375.83,375.25,375.25],
    [1317914160000,375.26,375.78,375,375.32],
    [1317914220000,375.385,375.405,375,375.03],
    [1317914280000,375,375.47,374.6,374.6],
    [1317914340000,374.58,375.28,374.57,374.69],
    [1317914400000,374.69,375.29,374.69,374.994],
    [1317914460000,374.94,374.972,374.07,374.23],
    [1317914520000,374.21,374.86,374.15,374.8],
    [1317914580000,374.813,375.23,374.43,374.67],
    [1317914640000,374.605,375.12,374.33,374.52],
    [1317914700000,374.52,375.75,374.52,375.56],
    [1317914760000,375.6881,375.83,375.11,375.362],
    [1317914820000,375.296,376.44,375.29,376.345],
    [1317914880000,376.34,376.4,375.2401,375.98],
    [1317914940000,375.88,375.95,374.8,374.81],
    [1317915000000,374.81,375.1825,374.55,374.94],
    [1317915060000,374.91,375.5464,374.91,375.305],
    [1317915120000,375.28,376.73,375.28,376.29],
    [1317915180000,376.4088,376.98,376.29,376.574],
    [1317915240000,376.56,376.608,375.63,375.89],
    [1317915300000,375.91,376.11,375.16,375.55],
    [1317915360000,375.62,375.98,375.25,375.84],
    [1317915420000,375.83,376.699,375.67,376.4299],
    [1317915480000,376.26,376.81,376.26,376.35],
    [1317915540000,376.407,376.89,376.27,376.6988],
    [1317915600000,376.57,376.65,376.12,376.4],
    [1317915660000,376.31,376.74,376.29,376.61],
    [1317915720000,376.6781,376.99,376.34,376.811],
    [1317915780000,376.9049,377.23,376.78,377.022],
    [1317915840000,377.09,377.76,376.84,377.5],
    [1317915900000,377.5224,377.6258,376.81,377.17],
    [1317915960000,377.11,377.161,376.26,376.56],
    [1317916020000,376.65,376.924,376.4,376.58],
    [1317916080000,376.436,376.84,376.255,376.48],
    [1317916140000,376.7,377.06,376.21,377],
    [1317916200000,377.03,377.4,376.94,377.29],
    [1317916260000,377.3,377.34,376.85,376.86],
    [1317916320000,376.915,377.37,376.77,377.09],
    [1317916380000,377.09,377.11,376.67,376.87],
    [1317916440000,376.89,377.0355,376.64,376.92],
    [1317916500000,376.9,376.97,376.28,376.351],
    [1317916560000,376.42,376.87,376.42,376.8],
    [1317916620000,376.81,377.2,376.6,377.056],
    [1317916680000,377.15,377.35,376.9,377.19],
    [1317916740000,377.19,377.35,376.64,377.31],
    [1317974400000,376,376,375.91,376],
    [1317974460000,376.18,376.2,376.18,376.2],
    [1317974520000,376,376,376,376],
    [1317974640000,376.1,376.2,376.1,376.2],
    [1317974760000,376.2,376.2,376,376.05],
    [1317974820000,376.05,376.05,376.05,376.05],
    [1317974940000,376.07,376.07,376.07,376.07],
    [1317975120000,376.07,376.07,376.05,376.05],
    [1317975180000,376.02,376.02,375.82,375.92],
    [1317975240000,375.85,375.98,375.85,375.98],
    [1317975300000,376,376.17,376,376.17],
    [1317975360000,376.25,376.3,376.25,376.3],
    [1317975420000,376.05,376.05,376.05,376.05],
    [1317975480000,376.35,376.38,376.35,376.38],
    [1317975540000,376.08,376.17,376.08,376.17],
    [1317975600000,376.28,376.28,376.19,376.28],
    [1317975660000,376.19,376.3,376.19,376.25],
    [1317975720000,376.3,376.38,376.25,376.38],
    [1317975780000,376.26,376.3,376.26,376.3],
    [1317975840000,376.17,376.17,376.15,376.15],
    [1317975900000,376.15,376.25,376.15,376.25]];
        var d = new Date();
        d.setSeconds(0);
        d.setMilliseconds(0);
        t= d.getTime();
        var data = [];
        for(var i=-50000*60;i<0;i+=1000*60){
        var temp = parseFloat((3+Math.round(Math.random()*100)/100).toFixed(2));
        var d = {
            x:t + i,
            open: ohlcData[-i/6000][1],
            high:ohlcData[-i/6000][2],
            low:ohlcData[-i/6000][3],
            close:ohlcData[-i/6000][4],
            // y:ohlcData[-i/6000][4]
        }
       data.push(d);
    }

    var chartType = "line"
        var chart = Highcharts.StockChart({
            chart: {
                zoomType: 'x',
                alignTicks: false,
                // type: chartType,
                animation: false,
                reflow: true,
                renderTo: 'highChartsContainer'
            },
            series: [{
                "name": "seriesName1",
                "id": "seriesName1",
                "lineWidth": 1,
                "type": chartType,
                "step": false,
                "visible": true,
                "enableMouseTracking": true,
                "dataGrouping": {
                    "enabled": true,
                    "groupPixelWidth": 20
                }
            }]
        });
        setTimeout(function(){
            chart.series[0].setData(data,true);

        },500);
        var el = document.getElementById("select_chartType");
        el.value = chartType;
        el.addEventListener("change",function(event){
            var option = {
                type:el.value,
                data:el.value=="line"?data.map((d)=>{
                        return {x:d.x,y:d.close};
                    }):data
            }
            chart.series[0].update(option);

        });
    </script>

    <!-- <script>
        var subject = new Rx.Subject();

        var subscription = subject.filter(m=>{
            return m.request == 123
        }).subscribe(m=>{
            if(m.msgType=="endMarker"){
                if(subscription){
                    subscription.unsubscribe();
                }
            }else if(m.msgType=="data"){
                console.log("onMessage",m);
            }
        })

        setInterval(function(){
            subject.next({
                request:1234,
                msgType:"error"
            });
        },2000)

        setInterval(function(){
            subject.next({
                request:123,
                msgType:"data"
            });
        },2000)

        setTimeout(() => {
            subject.next({
                request:123,
                msgType:"endMarker"
            }); 
        }, 10000);
    
    </script> -->
</body>

</html>